<?
function smarty_function_nospaces($params, &$smarty)
{
    return str_replace(' ', '&nbsp;', $params['val']);
}
?>